/*
 * Copyright (C) 2010-2013 Wells Software Technologies Inc.
 */
package com.donzell.model.bean;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="user",schema="")
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;
	private String username;// 登录名
	private String password;// 密码
	private Boolean admin; // 是否是管理员

	public User(String id,String username,String password){
		this.id = id;
		this.username = username;
		this.password = password;
	}
	
	
	public User() {
		super();
	}

	public User(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@JsonIgnore
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setAdmin(Boolean admin) {
		this.admin = admin;
	}

	public Boolean isAdmin() {
		return this.admin;
	}
}
